﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CoralNode.Core.Entity.Domains.Node;
using CoralNode.Core.Entity.Domains.User;
using CoralNode.Core.Entity.Model;
using CoralNode.Core.IService.Node;
using CoralNode.Core.IService.User;
using CoralNode.MvcClient.Contexts;

namespace Gongfu.Helper
{
    public class CodeHelper
    {
        private readonly IUserService _userService;

        public CodeHelper(IUserService userService)
        {
            _userService = userService;
        }
        public string HasCode(long id)
        {
            UserDomain user = _userService.FindById(id);
            if (user.Interest == "1")
            {
                return "1";
            }
            else
            {
                return "0";
            }
        }
    }
}